package com.hsmw.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hsmw.common.base.BaseModel;
import com.hsmw.domain.vo.DriverInfoVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 车辆信息表
 * </p>
 *
 * @author WD
 * @since 2021-01-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "HsmwVehicle对象", description = "车辆信息表")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HsmwVehicle extends BaseModel {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = " 车号 ")
	private String carNum;

	@ApiModelProperty(value = " 车牌号 ")
	private String vehiclePlate;

	@ApiModelProperty(value = " 车辆类型 ")
	private String vehicleType;

	@ApiModelProperty(value = " 车牌型号 ")
	private String vehicleModel;

	@ApiModelProperty(value = " 车牌品牌 ")
	private String vehicleBrand;

	@ApiModelProperty(value = " 行驶证号码 ")
	private String drivingLicenseNum;

	@ApiModelProperty(value = " 行驶证正面照片")
	private String drivingFrontImage;

	@ApiModelProperty(value = " 行驶证副本照片")
	private String drivingCopyImage;

	@ApiModelProperty(value = " 左45度照片")
	private String vehicleLeftImage;

	@ApiModelProperty(value = " 右45度照片")
	private String vehicleRightImage;

	@ApiModelProperty(value = " 交强险保单照片 ")
	private String compuTrafficImage;

	@ApiModelProperty(value = " 商业保险保单照片 ")
	private String commercialInsuranceImage;

	@ApiModelProperty(value = " 所属租赁公司ID ")
	private String leasingCompanyId;

	@ApiModelProperty(value = "所属租赁公司名称")
	private String leasingCompanyName;

	private Integer flag;

	@ApiModelProperty(value = "车辆状态:空闲中  工作中")
	private String workStatus;

	@ApiModelProperty(value = "管理车辆接口所需的key")
	@TableField(exist = false)
	private String key;

	@ApiModelProperty(value = "绑定司机的数量")
	@TableField(exist = false)
	private Integer bindDriverCount;

	@ApiModelProperty(value = "租赁公司类型")
	@TableField(exist = true)
	private String leasingCompanyType;

	@ApiModelProperty(value = "车辆高度")
	private Double height;

	@ApiModelProperty(value = "宽度")
	private Double width;

	@ApiModelProperty(value = "车轴数量")
	private Integer axis;

	@ApiModelProperty(value = "车辆年限")
	private String years;

	@ApiModelProperty(value = "手机定位信息")
	private String mobileLocate;

	@ApiModelProperty(value = "gpsTMEI识别号码")
	private String imeiNum;

	@ApiModelProperty(value = "手机定位方向")
	private String mobileDirect;

	@ApiModelProperty(value = "车辆长度")
	private Double length;

	@ApiModelProperty(value = "车重量")
	private Double weight;

	@ApiModelProperty(value = "新装gps识别码")
	private String identifyingCode;


	@ApiModelProperty(value = "新装gps识别码")
	private String terminalCode;


	public String getKey() {
		return getId();
	}

	@ApiModelProperty(value = "绑定司机列表")
	@TableField(exist = false)
	private List<HsmwUserDriver> bindDrivers;


	@ApiModelProperty("臂节数")
	private String armSegment;


	@ApiModelProperty(value = "车辆开始使用时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private LocalDate beginTime;


	@ApiModelProperty(value = "行驶证到期时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private LocalDate drivingLicenseTime;

	@ApiModelProperty(value = "交强险保单到期时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private LocalDate compuTrafficTime;

	@ApiModelProperty(value = "商业险保单到期时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private LocalDate commercialInsuranceTime;


	@ApiModelProperty(value = "绑定司机列表")
	@TableField(exist = false)
	private String vehicleAddress;

	@ApiModelProperty("最大司机数量")
	private String maxDriverNumber;

	@ApiModelProperty("底盘品牌")
	private String chassisBrand;

	@ApiModelProperty("故障率")
	private String trafficRate;

	@ApiModelProperty(value = "开通平台接单的标志")
	private boolean receiveFlag;

	@ApiModelProperty(value = "1:启用,0:禁用")
	private Boolean enabled;

	@ApiModelProperty("服务省份")
	private String inProvince;

	@ApiModelProperty("服务城市")
	private String	inCity;

	@ApiModelProperty("服务县区")
	private String inCounty;










	@ApiModelProperty(value = "手机定位信息")
	@TableField(exist = false)
	private String imeiNumLocate;



	@ApiModelProperty(value = "司机信息列表")
	@TableField(exist = false)
	private List<DriverInfoVO> driverCountVOS;


	@ApiModelProperty(value = "车辆权属类型")
	@TableField(exist = false)
	private String ownType;

	@ApiModelProperty(value = "gps位置")
	@TableField(exist = false)
	private  	String location;

	@ApiModelProperty(value = "gps方向")
	@TableField(exist = false)
	private  	String direct;



}
